<%--
  Created by IntelliJ IDEA.
  User: wuligang
  Date: 2021/9/28
  Time: 14:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>商品列表</title>
</head>
<body>
<table>
    <tr>
        <th>id</th>
        <th>商品名称</th>
        <th>价格</th>
        <th>描述</th>
    </tr>
    <c:forEach items="${items}" var="item" varStatus="v">
        <tr
        <c:if test="${v.count%2 eq 0}"> style="background-color: cadetblue" </c:if>
        >
            <td>${item.id}</td>
            <td>${item.itemName}</td>
            <td>${item.itemPrice}</td>
            <td>${item.itemDetail}</td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
